<template>
 <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
  <div class="home">
    <input type="text" placeholder="搜症状、科室，医生">
    <van-tabs v-model="active" class="nav">
  <van-tab title="推荐"></van-tab>
  <van-tab title="内科"></van-tab>
  <van-tab title="外科"></van-tab>
  <van-tab title="骨科"></van-tab>
  <van-tab title="儿科"></van-tab>
  <van-tab title=""></van-tab>
  <van-icon is-link name="apps-o" class="apps" @click="showPopup" />
  <van-popup v-model="show" position="right" :style="{ height: '100%' ,width: '30%'}">
    <van-cell-group :style="{ textAlign:'center' }">
  <van-cell title="内科" />
  <van-cell title="外科" />
  <van-cell title="妇产科" />
  <van-cell title="儿科" />
  <van-cell title="皮肤科" />
  <van-cell title="耳鼻喉科" />
  <van-cell title="眼科" />
  <van-cell title="口腔科" />
  <van-cell title="精神科" />
  <van-cell title="中医科" />
  <van-cell title="肿瘤科" />
</van-cell-group>
  </van-popup>
</van-tabs>
  </div>
  <van-card
  price="29.00/次"
  desc="主任医师"
  title="吴摘"
  thumb="https://www.pmdaniu.com/storages/114179/f9ae8e19d16d9c2bdccc1bfe998f2c52-1336/images/%E5%8C%BB%E7%94%9F%E5%88%97%E8%A1%A8/avatar_u97-0.svg"
>
  <template #tags>
    <van-tag plain type="danger">内分泌科</van-tag>
    <van-tag plain type="danger">中日友好医院</van-tag>
  </template>
  <template #footer>
   <van-button plain type="primary" size="small" @click="$router.push('/doctor')" >立即咨询</van-button>
  </template>
</van-card>

  </van-pull-refresh>
</template>

<script>
import { Toast } from 'vant'
export default {
  name: 'Home',
  data () {
    return {
      value: '',
      active: 0,
      isLoading: true,
      show: false
    }
  },
  methods: {
    onRefresh () {
      setTimeout(() => {
        Toast('刷新成功')
        this.isLoading = false
      }, 1000)
    },
    showPopup () {
      this.show = true
    }
  }
}
</script>

<style lang="less" scoped>
input{
  width:90%;
  height:50px;
  margin:20px;
  background:rgb(242,242,242);
  border: aliceblue;
}
.nav{
  position: relative;
}
.apps{
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 20px;
}
</style>
